package com.yun.zf.common.app.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 房源表
 * </p>
 *
 * @author cj
 * @since 2021-03-01
 */
@TableName("zf_house_detail")
@Data
public class ZfHouseDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 房源库主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "")
    private Long id;


    @NotNull(message = "房源表id不能为空")
    @ApiModelProperty(value = "房源表id")
    private Long basicId;


    @ApiModelProperty(value = "省级区划代码")
    private Long provinceCode;


    @ApiModelProperty(value = "城市编码")
    private Long cityCode;

    @NotNull(message = "期望价格不能为空")
    @ApiModelProperty(value = "期望价格")
    private BigDecimal hopedPrice;

    @NotNull(message = "底价不能为空")
    @ApiModelProperty(value = "底价")
    private BigDecimal exhaustPrice;

    // 成交价
    private BigDecimal finalPrice;

    @NotNull(message = "面积不能为空")
    @ApiModelProperty(value = "面积")
    private BigDecimal area;


    @NotNull(message = "卧室不能为空")
    @ApiModelProperty(value = "几卧")
    private Integer bedrooms;


    @NotNull(message = "厅不能为空")
    @ApiModelProperty(value = "几客厅")
    private Integer livingRoom;


    @NotNull(message = "卫不能为空")
    @ApiModelProperty(value = "几卫")
    private Integer toilet;


    @NotNull(message = "楼层不能为空")
    @ApiModelProperty(value = "楼层")
    private Integer floor;


    @NotNull(message = "总楼层不能为空")
    @ApiModelProperty(value = "总楼层")
    private Integer totalFloor;

    /**
     * 楼层：如中楼层 --- 1/3以下为低楼层，2/3以上为高楼层
     */
    private String floorTag;


    /**
     * 房屋朝向，如果是合租，则填卧室朝向，只能是英文字母，中文搜索有问题
     */
    @NotBlank(message = "房屋朝向不能为空")
    @ApiModelProperty(value = "房屋朝向只能字母如 南:S,北N,东E,西W")
    private String direction;

    /**
     * 是否有电梯，0有，1 无
     */
    @NotNull(message = "是否有电梯为必选")
    @ApiModelProperty(value = "是否有电梯，0有，1 无")
    private Integer isElevator;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime ;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifiedTime = new Date();

    /**
     * 房源编号
     */

    private String houseNumber;




    @ApiModelProperty(value = "价格单位")
    private String priceUnit;

    @ApiModelProperty(value = "标题")
    private String title;
    @ApiModelProperty(value = "二手房单价")
    private BigDecimal averagePrice;
}
